package behaviorType.iterator;

public class TVChannelIterator implements Iterator {
	private String[] tvChannel = { "cctv-1", "cctv-2", "cctv-3", "cctv-4", "cctv-5", "cctv-6", "cctv-7" };
	private int current = 0;

	@Override
	public String next() {
		if (hasNext()) {
			return tvChannel[current++];
		}
		return null;
	}

	@Override
	public boolean hasNext() {
		if (current < tvChannel.length) {
			return true;
		}
		return false;
	}
}